1. Field of the Invention
The present invention relates to a communication device that mediates both voice and in-band facsimile communication between a terminal device and a packet network.
2. Description of the Related Art
Facsimile machines have traditionally been used to send digitized image data over telephone lines. With the increasing migration of telephone communication to packet networks such as the Internet, facsimile machines and telephone sets may now be connected to a type of communication device that functions as an adapter or gateway by converting voice and facsimile signals to packet data in the outgoing direction, and converting packet data to voice and facsimile signals in the incoming direction. Facsimile communication may take place either in-band, using the same channel as used for voice communication, or out-of-band, using a separate signaling channel.
Like ordinary telephone equipment, these gateway devices include echo cancelers that predict and cancel echoes of the incoming signal in the outgoing signal. To compensate for the delays that tend to occur in packet networks, gateway devices also have jitter buffers in which arriving packets are temporarily stored to allow delayed packets to catch up with the packet flow.
To prevent overflow of the jitter buffer, which could seriously degrade voice communication, some gateway devices have an automatic delay recovery control function that selectively deletes data from the jitter buffer, the amount deleted being small enough that the user does not notice any difference in the received voice signal. Japanese Patent Application Publications No. 2003-125186 and 2006-121176 disclose examples of voice gateway devices of this type.
The present invention is concerned with gateway devices that perform in-band facsimile communication and have a delay recovery control function.
In-band facsimile communication takes place in five phases:
Phase A: call setup (calling and answering tones)
Phase B: pre-message procedure (capabilities negotiation and training)
Phase C: message transmission (image data)
Phase D: post-message procedure (end-of-message confirmation)
Phase E: disconnection
In the gateway device, phase A takes place in the voice communication mode, with the echo canceler and delay recovery control function enabled. When the calling and answering tones have been sent and received, the gateway device switches into a facsimile mode in which the echo canceler and delay recovery control function are deactivated. Facsimile transmissions would not succeed if the sending device were to subtract predicted echo signals from the outgoing facsimile data, or if the receiving communication device were arbitrarily to delete small amounts of received facsimile data from its jitter buffer. Phases B, C, and D take place in the facsimile mode. After disconnection in phase E, the gateway device switches back to the voice mode and waits for the next call.
Problems have been found to occur in the switchovers both from voice mode to facsimile mode and from facsimile mode to voice mode.
For example, a gateway device may switch from voice mode to facsimile mode too early, while the device with which it is communicating is still sending a phase-A tone signal. The remaining part of the tone signal then interferes with operations in phase B.
At the end of the facsimile transmission, since the gateway device waits until the line has been disconnected before reactivating the echo canceler and delay recovery control function, the echo canceler and delay recovery control function are not reactivated if the line is left connected for continued voice communication, which may occur when, for example, the facsimile transmission is conducted as part of a teleconference call. The continuing voice communication may then be impaired by echo or buffer overflow problems.
Accordingly, there is a need for more reliable switchovers between the voice and facsimile communication modes.